package faultTolerant;

import lombok.extern.slf4j.Slf4j;
import model.RpcResponse;

import java.util.Map;

/**
 * 容错机制：快速失败
 */
@Slf4j
public class FaultFastFail implements FaultTolerant{
    public RpcResponse tolerant(Map<String,Object> map, Exception e){
        log.info("重试达到最大失败，转入快速失败处理");
        log.info("快速失败异常：" + e);
        throw new RuntimeException("重试达到最大失败，转入快速失败处理");
    }
}
